package com.smedi.ismedi.personnel.core.domain.service;

import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.smedi.ismedi.personnel.core.domain.aggregatemodel.ProfileImage;
import com.smedi.ismedi.personnel.core.infrastructure.enumerate.CapacityEnum;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: xulinjun
 * @Date: 2021-6-8 11:10
 */
public interface ProfileImageDomainService {
    // 判断上传图片大小
    Boolean validateImageSize(Long len, int size, CapacityEnum capacity);

    // 判断文件是否是图片
    Boolean isImage(MultipartFile file);

    // 保存人员照片
    ProfileImage saveProfileImage(String imageUUID, Long personId);

    ProfileImage saveProfileImage(StorePath storePath, Long personId);

    ProfileImage getProfileImage(String imageUUID);
}
